1. Statement of the Technical Field
The present invention relates to the field of socket based data communications and more particularly to connection pool management.
2. Description of the Related Art
Connection pools represent a significant advance in the art of distributed computing. Prior to the implementation of the connection pool, client processes in a client-server configuration established direct connections with back-end server processes on demand. Often, these direct connections take the form of a socket between two ports, each port residing at a particular network address. Opening a connection between a client process and a server process can require the consumption of significant computing resources. Specifically, first a desired socket must be identified in the client process and requested of the server process. A handshaking process can result in consequence of which the connection can be established between the client and server processes.
It will be recognized by the skilled artisan that in an application where multiple, repeated connections will be required, a tremendous amount of computing resources can be consumed merely opening connections when required. Yet, particularly in data intensive applications involving repeated remote connections to back end database servers, so much can be the case. Further, it needn't always be the case that a connection can be established reliably. In this regard, when a socket cannot be established between the processes, the attempt can fail leaving little recourse for the client process. Unfortunately, the failure to attain a connection for use by the client process can range from too few available connections to malfunctioning connections.
Connection pooling is widely viewed as the appropriate tool to overcome the clear deficiencies of conventional computer process connectivity. Connection pooling is a technique used by applications which open many connections to a finite number of back-end server processes. The reverse proxy represents one typical application of the connection pool. In the prototypical connection pool, connections are pre-established with back-end server processes. These connections can be organized in a data structure such as an array or list in which the connections can remain idle until provisioned either by a host server process for the benefit of an external client, or directly by a client process. In this way, when client processes require the use of a connection with a back-end server process, it will not be necessary to create the connection each time.
In managing a pool of idle connections, an efficient process consuming little computing overhead can be required to validate that the connections which have not been provisioned recently remain valid and useable on demand. In this regard, it is known to perform placebo transactions using the idle connections to ensure the reliability of the idle connections. Of course, to perform the placebo transaction with respect to any one idle connection necessarily consumes the idle connection such that any attempt to access the idle connection can be blocked. While the liberal use of threads can overcome the blocking action of the placebo transaction, spawning a great many threads for concurrent usage can consume significant computing resources. Thus, in a pool of multiple idle connections, validating each connection using threaded validation processes can produce the same level of computing overhead that otherwise would exist in consequence of invalid idle connections.